package com.gcb.controller.system.service.impl;

import java.util.List;

import com.gcb.controller.system.domain.GcbOpenCity;
import com.gcb.controller.system.mapper.GcbOpenCityMapper;
import com.gcb.controller.system.service.IGcbOpenCityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 开通运营的城市Service业务层处理
 *
 * @author ruoyi
 * @date 2024-04-15
 */
@Service
public class GcbOpenCityServiceImpl implements IGcbOpenCityService {
    @Autowired
    private GcbOpenCityMapper gcbOpenCityMapper;

    /**
     * 查询开通运营的城市
     *
     * @param id 开通运营的城市主键
     * @return 开通运营的城市
     */
    @Override
    public GcbOpenCity selectGcbOpenCityById(Long id) {
        return gcbOpenCityMapper.selectGcbOpenCityById(id);
    }

    /**
     * 查询开通运营的城市列表
     *
     * @param gcbOpenCity 开通运营的城市
     * @return 开通运营的城市
     */
    @Override
    public List<GcbOpenCity> selectGcbOpenCityList(GcbOpenCity gcbOpenCity) {
        return gcbOpenCityMapper.selectGcbOpenCityList(gcbOpenCity);
    }

    /**
     * 新增开通运营的城市
     *
     * @param gcbOpenCity 开通运营的城市
     * @return 结果
     */
    @Override
    public int insertGcbOpenCity(GcbOpenCity gcbOpenCity) {
            return gcbOpenCityMapper.insertGcbOpenCity(gcbOpenCity);
    }

    /**
     * 修改开通运营的城市
     *
     * @param gcbOpenCity 开通运营的城市
     * @return 结果
     */
    @Override
    public int updateGcbOpenCity(GcbOpenCity gcbOpenCity) {
        return gcbOpenCityMapper.updateGcbOpenCity(gcbOpenCity);
    }

    /**
     * 批量删除开通运营的城市
     *
     * @param ids 需要删除的开通运营的城市主键
     * @return 结果
     */
    @Override
    public int deleteGcbOpenCityByIds(Long[] ids) {
        return gcbOpenCityMapper.deleteGcbOpenCityByIds(ids);
    }

    /**
     * 删除开通运营的城市信息
     *
     * @param id 开通运营的城市主键
     * @return 结果
     */
    @Override
    public int deleteGcbOpenCityById(Long id) {
        return gcbOpenCityMapper.deleteGcbOpenCityById(id);
    }
}
